2 Online Algorithms 2.1 Ski Rental Problem (rent-or-buy)
نویسندگان
چکیده
Online algorithms use a different model from what we’ve seen so far: the algorithm does not have the entire input at its beginning, but receives it piece by piece, sequentially, over time. After receiving each piece, the algorithm must immediately make a decision (updating a data structure, buying/selling stocks) which each have an associated cost. Ultimately, the goal of the algorithm is to minimize the total cost over time. Under this model, an offline algorithm is equivalent to receiving the entire input first, then making all decisions at the end with the full information. If we placed no restrictions on the ability to retract decisions (by making it expensive or disallowing it entirely), we could have our online algorithm perform a full recomputation after receiving each new piece of input, and obtain a solution equivalent to the offline version. There are various flavors of this restriction, some which are more domain-focused:
منابع مشابه
Competitive Analysis
The ski rental problem arises from the following scenario. You want to start skiing, but you don’t own any skis. On each day you go skiing, you can either choose to rent skis for cost 1, or you can buy skis for cost s. Since you don’t know when you might get sick of skiing, (or when you might break your leg and be unable to ski again), the number of days d that you will end up skiing is unknown...
متن کاملRent, Lease or Buy: Randomized Algorithms for Multislope Ski Rental
In the Multislope Ski Rental problem, the user needs a certain resource for some unknown period of time. To use the resource, the user must subscribe to one of several options, each of which consists of a one-time setup cost (“buying price”), and cost proportional to the duration of the usage (“rental rate”). The larger the price, the smaller the rent. The actual usage time is determined by an ...
متن کاملPrice Fluctuations: To Buy or to Rent
We extend the classic online ski rental problem, so that the rental price may change over time. We consider several models which differ in the knowledge given to the algorithm: whereas the price development is unknown, an algorithm may have full, partial or no knowledge about the duration of the game. We construct algorithms whose competitive ratios are up to constant or logarithmic factors opt...
متن کاملSki rental with two general options
We define and solve a simple extension of the ski-rental problem [4]. In the classical version, the algorithm needs to decide when to switch from renting to buying. In our version, no pure buy option is available: even after switching to the buy option, the algorithm needs to pay some reduced rent. We present an online algorithm for this problem with a matching lower bound.
متن کاملGeneralizations of Ski-Rental
Suppose you want to start a new hobby: skiing. In the ski shop, they give you the options to either rent skis or buy skis. If you know a priori how many days you will be skiing, then you can easily compute whether you should rent or buy right from the first day. This is an example of offline problems—all information is given at once, even future information. In the real world, you would not kno...
متن کامل